bitkeeper revision 1.1579 (429831c4g3vltIzzOokMmu5rtSZAcQ)
authorleendert@watson.ibm.com[kaf24] <leendert@watson.ibm.com[kaf24]>
Sat, 28 May 2005 08:54:28 +0000 (08:54 +0000)
committerleendert@watson.ibm.com[kaf24] <leendert@watson.ibm.com[kaf24]>
Sat, 28 May 2005 08:54:28 +0000 (08:54 +0000)
[PATCH] [PATCH] ioemu: enable Cirrus VGA emulation

At some point the Cirrus VGA driver was commented out. Probably
for debugging. The patch below adds it back in. It works just fine.

Signed-Off-By: Leendert van Doorn <leendert@watson.ibm.com>
tools/ioemu/hw/pc.c
tools/ioemu/hw/vga.c
tools/ioemu/target-i386-dm/Makefile

index d27ac4058e13acd28c188d46c38c1660746e5e36..70cafc55f1c38238df461cd12b61f7d18d65751b 100644 (file)
@@ -389,7 +389,7 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
     linux_boot = (kernel_filename != NULL);
 
     /* allocate RAM */
-//    cpu_register_physical_memory(0, ram_size, 0);
+//  cpu_register_physical_memory(0, ram_size, 0);
 
 #ifndef NOBIOS
     /* BIOS load */
@@ -436,9 +436,9 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
     /* map all the bios at the top of memory */
     cpu_register_physical_memory((uint32_t)(-bios_size), 
                                  bios_size, bios_offset | IO_MEM_ROM);
+#endif
     
     bochs_bios_init();
-#endif
 
     if (linux_boot) {
         uint8_t bootsect[512];
@@ -508,9 +508,6 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
 
     register_ioport_write(0xf0, 1, 1, ioportF0_write, NULL);
 
-#ifdef NOBIOS
-    cirrus_vga_enabled = 0;
-#endif
     if (cirrus_vga_enabled) {
         if (pci_enabled) {
             pci_cirrus_vga_init(pci_bus, 
index d6358d92fea1895770cd215c204660e81d39560d..2867bd55d45d6ba8641d325234a011fe89892272 100644 (file)
@@ -1877,7 +1877,7 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
 
     /* qemu's vga mem is not detached from phys_ram_base and can cause DM abort
      * when guest write vga mem, so allocate a new one */
-    s->vram_ptr = qemu_mallocz(256 * 1024);
+    s->vram_ptr = qemu_mallocz(vga_ram_size);
 
     s->vram_offset = vga_ram_offset;
     s->vram_size = vga_ram_size;
index 74a0d3a5635f56d87719b9d28d1573b54af44bf9..55a30f5dcf89c50b16f04554496a502027c5ba4d 100644 (file)
@@ -272,6 +272,7 @@ endif
 # Hardware support
 VL_OBJS+= ide.o ne2000.o pckbd.o vga.o dma.o
 VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o port-e9.o
+VL_OBJS+= cirrus_vga.o
 
 ifeq ($(TARGET_ARCH), ppc)
 VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)